//
//  CYBSetting.m
//  01-基本框架搭建
//
//  Created by apple on 16/8/29.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "CYBSetting.h"
#import "CYBStatus.h"
#import "CYBOneController.h"
#import "CYBTestTwoViewController.h"
#import "CYBStatusGroup.h"
#import "CYBTableViewCell.h"
#import "CYBStatusArrows.h"
#import "CYBStatusSwitch.h"
#import "MBProgressHUD+MJ.h"
#import "CYBProductController.h"
#import "CYBPushController.h"

@interface CYBSetting ()

@end

@implementation CYBSetting

//第一组数据
- (CYBStatusGroup *)group0{

    CYBStatus *MorePush = [CYBStatusArrows settingWithIcon:@"MorePush" title:@"推送和提醒" classVc:[CYBPushController class]];
    CYBStatus *handShake = [CYBStatusArrows settingWithIcon:@"handShake" title:@"遥一摇机选" classVc:[CYBOneController class]];
    CYBStatus *sound_Effect = [CYBStatusSwitch settingWithIcon:@"sound_Effect" title:@"声音效果"];
    CYBStatusGroup *group0 = [[CYBStatusGroup alloc] init];
    group0.header = @"头部标题1";
    group0.footer = @"尾部标题1";
    group0.items = @[MorePush,handShake,sound_Effect];
    return group0;
    
}

//第二组数据
- (CYBStatusGroup *)group1{
    
    CYBStatus *MoreUpdate = [CYBStatus settingWithIcon:@"MoreUpdate" title:@"检查更新"];
    MoreUpdate.statusBlock = ^{
        [MBProgressHUD  showMessage:@"正在检查新版本"];
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
            [MBProgressHUD hideHUD];
            [MBProgressHUD showError:@"没有检查到新版本"];
        });
    };

    CYBStatus *MoreHelp = [CYBStatus settingWithIcon:@"MoreHelp" title:@"帮助"];

    CYBStatus *MoreShare = [CYBStatus settingWithIcon:@"MoreShare" title:@"分享"];

    CYBStatus *MoreMessage = [CYBStatus settingWithIcon:@"MoreMessage" title:@"查看信息"];

    CYBStatus *MoreNetease = [CYBStatusArrows settingWithIcon:@"MoreNetease" title:@"产品推荐" classVc:[CYBProductController class]];

    CYBStatus *More_LotteryRecommend = [CYBStatus settingWithIcon:@"More_LotteryRecommend" title:@"关于"];

    CYBStatusGroup *group1 = [[CYBStatusGroup alloc] init];
    group1.header = @"头部标题1";
    group1.items = @[MoreUpdate,MoreHelp,MoreShare,MoreMessage,MoreNetease,More_LotteryRecommend];
    return group1;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title = @"设置";
    
    [self.status addObject:[self group0]];
    [self.status addObject:[self group1]];

    
}


@end
